public class Student {
    private final String name;
    private final int preferredQuantity;
    private final PaperType preferredType;

    public Student(String name, int preferredQuantity, PaperType preferredType) {
        this.name = name;
        this.preferredQuantity = preferredQuantity;
        this.preferredType = preferredType;
    }

    public String getName() {
        return name;
    }

    public int getPreferredQuantity() {
        return preferredQuantity;
    }

    public PaperType getPreferredPaperType() {
        return preferredType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return name.equals(student.name);
    }

    @Override
    public int hashCode() {
        return name.hashCode();
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                '}';
    }
}    